package com.webdesign.dao.jdbc;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class TbTermSQL {
	
	/*
	 * 获取TbTerm表格的termid最大值
	 */
	public String getMaxTermid(){
		Connection conn = null;
		Statement stmt = null;
		ResultSet rs = null;
		String strs = null;
		try {
			conn = DBConnection.getConnection();
			stmt = conn.createStatement();
			rs = stmt.executeQuery("select max(TermID) as TermID from tb_term");
			while (rs.next()) {
				strs=rs.getString("TermID");
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return strs;
	}
}
